home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CDPD Public Domain Collection for CDTV 4
/
CDPD_IV.bin
/
e
/
mailinglists
/
amigae.0793july.archive
/
000050_this_you can see that you need a maximum of 3 pixels.msg
< prev
next >
Wrap
Text File
|
1994-05-26
|
2KB
|
68 lines
to get any colour in the Amiga's 4096 range. This is what
causes the 'fringing' effect seen on HAM pictures. If you
were to write a paint program using HAM, you would need an
intelligent algorithm that would determine which colour in
the palette is the closest to that needed, and what order
to change the components in to reduce fringing.
But how does HAM8 work?
The principle is the same, except that you multiply
everything by 4. The first 64 colours come from the
palette, colours 64-127 change BLUE, 128-191 change RED
and 192-255 change GREEN. Also, note that if you choose,
say value 65, the blue value will not be 1, but $04. This
is because AGA colours range from $00 to $FF. Colour 66
equals a blue of $08 and so on...
There are limitations on HAM6 mode on non-AGA machines.
The poor old Agnus is not quick enough to fetch enough
data from screen memory to display a HI-RES (i.e. 640
pixels across) HAM screen. On the 1200, this is possible
because Alice is twice as quick as Agnus and can also
fetch twice as much data at the same time. This makes it
possible to open a HIRES HAM8 screen!
How to open a HAM screen?
That's simple, all you do is to OR the screen's DISPLAY ID
with the value $800. If you want HAM6, specify 6 planes,
if you want HAM 8 specify 8 planes. Simple really...
In Amiga E, a HAM8 screen goes like this:
.
.
DEF s:PTR TO screen
.
.
s:=OpenS(640,256,8,$8800,'Wow!')
.
.
I think I've got the parameters the right way round, but
begin separated from my Amiga :'-( [sniff], I can't be
sure, so check the reference guide. Don't forget to
declare the right modules if you want to use system
constants like HIRES_KEY, but really you can get away
without these.
I hope I've included enough information for you all to
browse (or should that be wade) through. If there's
anything missing that you'd like to know, I can *try* to
answer any requests...
I have written an AGA colour cube program (similar to
Photon Paint's) if anyone is interested. I'll have to make
a visit home to get the source. It's not particularly
multi-tasking friendly, so I'll tidy it up in the meantime
(don't want to teach anyone bad habits :-)
See ya!
Dave
P.S. Let me know if you try any of this info out
successfully. Also, don't be surprised if I've got the RED
and GREEN pixel values the wrong way round - I am working
from memory after all :-)